<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
	    <title><fmt:message key="systemUserDetail.heading"/></title>
	    <script type="text/javascript">
	     $(function() {
			setEmptyCheck("userName:password:confirmPassword:fullname");
			setMailCheck("email");
			setMobileCheck("mobile");
			setChecklength("password:confirmPassword");
		});
	     function checkConfirmPassword(){
	    	 var confirmPassword=$("#confirmPassword").val();
	    	 var password=$("#password").val();
	    	 if(password!=confirmPassword){
	    		 $("#confirmPassword").val('');
	    	 }
	     } function validateUserName(){
	    	 var userName=$("#userName").val();
	    	 if(userName==""){
	    		 return;
	    	 }
	 		$.ajax({
				 type: "post",
				  url:__ctxPath+"/member/user/userCommon.do?cmd=validateUserName",
				  data:{userName:userName},
				  async:false,
				  success:function(valicode){
					  var showText="";
					  $("#showText").empty();
					  if(valicode=='true'){
						  showText='恭喜您!账号可以使用';
					  }else{
						  showText='<font color="red">账号已使用 ,请重新填写</font>';
						  $("#userName").val('');
					  }
					  $("#showText").append(showText);
				  },
				  error:function(XMLHttpRequest){
					  $("#userName").val('');
					  $("#showText").append('<font color="red">获取请求错误!</font>');
					  }
			});
	     }
	     </script>
  </head>
  <body>
<ul class="enroll_top"><img src="${ctxPath}/resource/member/image/members/enroll_title.gif" width="816" height="8"/></ul>
	<form action="regeist.do" method="post" commandName="user">
	<ul class="enroll">
		<li class="enroll_title"><img src="${ctxPath}/resource/member/image/members/enroll_dot.gif" width="14" height="14" align="absmiddle"/> 填写个人资料信息</li>
		<li class="enroll_info">
			<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  				<tr>
    				<td><font color="#FF0000">&lowast;</font> 登录账号： <input type="text" onblur="validateUserName()" id="userName" name="username" class="enrollbox95" check=2 tip="不能为空"/><span id="showText"></span> </td>
  				</tr>
  				<tr>
    				<td><font color="#FF0000">&lowast;</font> 账号密码： <input maxlength="8"  type="password" id="password" name="password" class="enrollbox95" check=2 tip="不能为空"/></td>
  				</tr>
  				<tr>
    				<td><font color="#FF0000">&lowast;</font> 密码确认： <input maxlength="8" onblur="checkConfirmPassword()" type="password" id="confirmPassword" class="enrollbox95" check=2 tip="不能为空"/></td>
  				</tr>
  				<tr>
    				<td><font color="#FF0000">&lowast;</font> 电子邮箱： <input type="text"  id="email" name="email" class="enrollbox240" check=2 tip="不能为空,格式如XXX@163.com"/><font color="#666666">（邮箱是注册和找回密码的重要途径，请正确填写邮箱地址）</font></td>
  				</tr>
			</table>
		</li>
		<li class="enroll_info">
			<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  				<tr>
    				<td><font color="#FF0000">&lowast;</font>真实姓名： <input type="text" id="fullname" name="fullname" class="enrollbox95" check=2 tip="不能为空"/><font color="#666666">（填写正确的信息，能让我们为您提供更多的优质服务。）</font></td>
  				</tr>
  				<tr>
    				<td><font color="#FF0000">&lowast;</font>&nbsp;&nbsp;&nbsp;&nbsp;性&nbsp;&nbsp;&nbsp;&nbsp;别：  
						<select name="sex" size="1" class="enrollbox40">
    				  		<option value="1">男</option>
    				  		<option value="0">女</option>
    					</select></td>
  				</tr>
  				<tr>
    				<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;生&nbsp;&nbsp;&nbsp;&nbsp;日： 
					  &nbsp;<input type="text" name="birthday" class="enrollbox95"/></td>
  				</tr>
  				<tr>
    				<td>&nbsp;&nbsp;固定电话： &nbsp;<input type="text" name="phone" class="enrollbox95"/></td>
  				</tr>
				<tr>
    				<td><font color="#FF0000">&lowast;</font>手机号码： <input type="text" id="mobile" name="mobile" class="enrollbox120" check=2 tip="不能为空"/></td>
  				</tr>
  				<tr>
    				<td><font color="#FF0000">&lowast;</font>联系地址： <input type="text" name="textfield" class="enrollbox360"/></td>
  				</tr>
  				<tr>
    				<td>&nbsp;&nbsp;邮政编码：&nbsp;&nbsp; <input type="text" name="textfield" class="enrollbox95"/></td>
  				</tr>
			</table>
		</li>
		<li class="enroll_sumbit"><input type="reset" name="Submit" value="重 置"  class="message_submit"/>
		<input type="submit" name="Submit" value="提 交"  class="message_submit"/></li>
	</ul>
	</form>
	<ul class="enroll_bottom"><img src="${ctxPath}/resource/member/image/members/enroll_last.gif" width="816" height="8"/></ul>
</body>
</html>
